<template>
	<div class="tc">
		<mt-swipe :auto="2000" :showIndicators='false' class="swiper-container " style="height: 5.0rem;">
		  <mt-swipe-item v-for="(item,index) in newHotSwiper" >
		  	<img  v-lazy="baseImg+item.image" @click="goGoodInfo(item.dataType,item.refId)" :alt="index"  style="width: 100%; height: 4.0rem;">
		  	<p class="priceImg_p">￥{{item.product.malMobilePrice}}</p>
		  	<p class="title_p" style="height: 0.75rem; line-height: 0.75rem;">{{item.product.name1}}</p>
		  </mt-swipe-item>
		</mt-swipe>
	</div>
</template>
  
<script>
	export default {
		name: 'carrousel',
		data() {
			return {
				baseImg:"https://md.singaporetong.com",
			}
		},
		props:['newHotSwiper'],
		components: {
		},
	    computed: {
	    },
	    methods:{
	    	goGoodInfo:function(type,goodid){
	    		if(type == 1){ // 商品的datatype值为1的时候是商品 ，才能跳到商品详情页
		    		this.$router.push({
						path: "/goodinfo",
						name:  "goodinfo",
						params:{
							name:"goodInfo",
							goodId: goodid //   参数名称自定义，obj: 需要传递的参数
						}
					})
	    		}else{
	    			return false;
	    		}
	    	}
	    },
	    mounted() {
	    }

	}
</script>
<style rel="stylesheet" scoped>
	.swiper-container {
		width: 100%;
	}
	.swiper-slide {
		-webkit-transition: transform 1.0s;
		-moz-transition: transform 1.0s;
		-ms-transition: transform 1.0s;
		-o-transition: transform 1.0s;
		-webkit-transform: scale(0.8);
		transform: scale(0.8);
	}
	.swiper-slide-active,.swiper-slide-duplicate-active {
		-webkit-transform: scale(1);
		transform: scale(1);
	}
	.none-effect {
		-webkit-transition: none;
		-moz-transition: none;
		-ms-transition: none;
		-o-transition: none;
	}
	.swiper-slide img {
		width: 100%;
		border-radius: 0.125rem;
		display: block;
	}
	.title_p{
		height: 0.5333rem;
		font-size: 0.3733rem;
		color: #333333;
		position: absolute;
		width: 100%;
		text-align: center;
		margin-top: 0.2667rem;
	}

</style>